<!DOCTYPE html>
<html lang="en" class="bg-white">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>admin风格的弹窗</title>
    <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="../../../assets/module/admin.css?v=314"/>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<div style="padding: 25px 25px 15px 25px;">
    <div class="layui-text">
        我是一个iframe类型的弹窗，我会从上个页面接收传递过来的数据，下面的这个关闭按钮也是我自己加的，而且不需要任何js就能关闭我，只需要给它增加ew-event="closeIframeDialog"属性即可。
    </div>
    <div class="text-center" style="padding-top: 15px;">
        <button class="layui-btn" ew-event="closeIframeDialog">关闭我</button>
    </div>
</div>

<!-- js部分 -->
<script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
<script>
    layui.config({
        base: '../../../assets/module/'
    }).use(['layer', 'admin'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var admin = layui.admin;
        admin.iframeAuto();

        var layerData = admin.getLayerData();

        layer.msg('我收到了的数据：' + JSON.stringify(layerData), {icon: 2});

    });
</script>
</body>
</html>